Recover corrected carved suffixes with successor lineage - #64
Merged
Conversation
## Summary - Add immutable successor-source lineage and live v2 metadata reconstruction - Add exact-lease recovery for only the owned unmerged suffix of a published chain - Add regression tests, evaluator cases, and normative handoff documentation ## Why - Let accepted post-publication fixes rejoin a carved chain after an earlier prefix merges - Preserve source immutability, merged history, stable positions, ownership, and whole-chain equivalence Fixes #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Adds a live-reconstructible successor-source protocol that safely restamps only an owned, unmerged carved suffix after an accepted post-publication fix.
Summary
This PR closes the recovery dead end between
babysit-prcandidate fixes andcarve-changesetswhole-chain equivalence. It adds:recover-suffixcommand with explicit authority, same-repository ownership checks, and exact remote leases;review-code-changeandbabysit-pr.Ordinary v1 chains remain valid without migration. Recovery requires every lineage source at its exact SHA on the selected remote so a fresh clone can reconstruct the published chain.
Safety model
Recovery fails closed on mutable or unavailable sources, missing or discontinuous lineage, conflicting provenance, merged-prefix changes, unowned or forked PRs, unexpected branch advancement, lease races, and successor-tree mismatch. It never rewrites main, a merged changeset, or an immutable source.
Tickets
Fixes #63